package com.example.application;

import com.example.application.config.MyConfig;
import com.example.application.pojo.Person;
import com.example.application.pojo.Person2;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);
        Person p1 = applicationContext.getBean(Person.class);
        Person2 p2 = applicationContext.getBean(Person2.class);
        System.out.println(p1);
        System.out.println(p2);
    }

}
